﻿<Window x:Class="eWallet.SecretWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Secret" Height="480" Width="580" ResizeMode="CanResizeWithGrip">
	<Grid>
		<TabControl Name="MainTab" Margin="12,12,12,54">
			
			<TabItem Header="Group" Name="GroupTabItem">
				<DockPanel>
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto" />
							<RowDefinition Height="Auto" />
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto" />
							<ColumnDefinition />
						</Grid.ColumnDefinitions>

						<TextBlock Style="{StaticResource InfoText}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" TextWrapping="Wrap">Select the group you want to assign the secret to. Each group can be protected with a different password or a different certificate.</TextBlock>

						<Label Grid.Row="1" Grid.Column="0" Name="GroupLabel">Group:</Label>
						<ComboBox Grid.Row="1" Grid.Column="1" Name="GroupCombo" />
					</Grid>
				</DockPanel>
			</TabItem>
			<TabItem Header="Meta Data" Name="MetaDataTabItem">
				<DockPanel>
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto" />
							<RowDefinition Height="*" />
							<RowDefinition Height="*" MaxHeight="128" />
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto" />
							<ColumnDefinition />
						</Grid.ColumnDefinitions>
						
						<TextBlock Style="{StaticResource InfoText}" TextWrapping="Wrap" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">Note! Data that you enter on this tab is not encrypted and is only used to describe the encrypted data that you enter on the 'Secret Data' tab.</TextBlock>

						<Label Grid.Row="1" Grid.Column="0" ToolTip="Give a description for your secret.">Description:</Label>
						<TextBox Grid.Row="1" Grid.Column="1" Name="DescriptionTextbox" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" />
						
						<Label Grid.Row="2" Grid.Column="0" ToolTip="Tags allow you to group secrets together. You can specify as many tags as you like. Tags are separated by a semicolon, ;.">Tags:</Label>
						<TextBox Grid.Row="2" Grid.Column="1" Name="TagsTextbox" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" />
					</Grid>
				</DockPanel>
			</TabItem>
			<TabItem Header="Secret Data" Name="SecretDataTabItem">
				<DockPanel>
					<Grid Name="SecretTabLayoutGrid">
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto" />
							<RowDefinition Height="Auto"  />
							<RowDefinition Height="0" />
							<RowDefinition Height="0" />
							<RowDefinition Height="Auto" />
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto" />
							<ColumnDefinition />
						</Grid.ColumnDefinitions>
						
						<TextBlock Style="{StaticResource InfoText}" TextWrapping="Wrap" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">All data that you enter on this tab is protected by the security features of the group that you selected on the 'Group' tab.</TextBlock>
						
						<Label Grid.Row="1" Grid.Column="0" ToolTip="Select what kind of data you want to protect in the secret.">Type:</Label>
						<ComboBox Grid.Row="1" Grid.Column="1" Name="ContentTypeCombo" SelectionChanged="ContentTypeCombo_SelectionChanged">
							<ComboBoxItem ToolTip="Select this option if your secret data is plain text that you enter in a text box.">Text</ComboBoxItem>
							<ComboBoxItem ToolTip="Select this option if your secret data is a file that you want to protect.">File</ComboBoxItem>
						</ComboBox>

						<GroupBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Header="Plain Text" Name="PlainTextGroup">
							<Grid>
								<Grid.RowDefinitions>
									<RowDefinition Height="Auto" />
									<RowDefinition Height="*" />
								</Grid.RowDefinitions>
								
								<TextBlock Style="{StaticResource InfoText}" Grid.Row="0" TextWrapping="Wrap">Specify the text you want to protect in the text box below. The text can be as long as you want.</TextBlock>
								<TextBox Grid.Row="1" Name="PlainTextTextbox" FontFamily="Consolas" AcceptsReturn="True" AcceptsTab="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto"></TextBox>
							</Grid>
						</GroupBox>

						<GroupBox Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Header="File" Name="FileGroup">
							<StackPanel>
								
								<Grid>
									<Grid.RowDefinitions>
										<RowDefinition />
										<RowDefinition />
									</Grid.RowDefinitions>
									<Grid.ColumnDefinitions>
										<ColumnDefinition />
										<ColumnDefinition Width="Auto" />
									</Grid.ColumnDefinitions>
									
									<TextBlock Style="{StaticResource InfoText}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" TextWrapping="Wrap">Select the file you want to protect. After you have saved the data on this dialog, the file will be encrypted and stored in the e-Wallet database, so you can remove it from your hard disk.</TextBlock>
									
									<TextBox Grid.Row="1" Grid.Column="0" Name="FilePathTextbox" IsReadOnly="True" IsTabStop="False" TextChanged="FilePathTextbox_TextChanged" />
									<Button Grid.Row="1" Grid.Column="1" Name="BrowseFileButton" Height="23" Width="23" Click="BrowseFileButton_Click">...</Button>
								</Grid>
							</StackPanel>
						</GroupBox>
						
						<GroupBox Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Header="Content Description">
							<Grid>
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="Auto" />
									<ColumnDefinition />
								</Grid.ColumnDefinitions>
								<Grid.RowDefinitions>
									<RowDefinition />
									<RowDefinition />
								</Grid.RowDefinitions>
								
								<Label Grid.Row="0" Grid.Column="0">Content Type:</Label>
								<TextBox Grid.Row="0" Grid.Column="1" Name="ContentTypeTextbox" IsReadOnly="True" IsTabStop="False"></TextBox>
								
								<Label Grid.Row="1" Grid.Column="0">File Name:</Label>
								<TextBox Grid.Row="1" Grid.Column="1" Name="FileNameTextBox" IsReadOnly="True" IsTabStop="False"></TextBox>
							</Grid>
						</GroupBox>
					</Grid>
				</DockPanel>
			</TabItem>
		</TabControl>
		<Button Name="OKButton" Style="{StaticResource DialogButton}" VerticalAlignment="Bottom" Margin="0,0,74,12" HorizontalAlignment="Right" Click="OKButton_Click" IsDefault="True">_OK</Button>
		<Button Style="{StaticResource DialogButton}" HorizontalAlignment="Right" Margin="0,0,12,12" Name="CancelButton" VerticalAlignment="Bottom" Click="CancelButton_Click" IsCancel="True">_Cancel</Button>
	</Grid>
</Window>
